﻿using System;
using Cysharp.Threading.Tasks;
using Framework.Interface;

namespace Framework.StateMechine
{
    public class StateBase
    {
        public Enum Id;
        protected StateMachine stateMachine;
        protected StateArgs args;

        public StateBase()
        {
            
        }

        public virtual async UniTask OnCreate(Enum id, StateMachine machine)
        {
            Id = id;
            stateMachine = machine;
            await UniTask.CompletedTask;
        }

        public virtual async UniTask OnEnter(StateArgs _args)
        {
            args = _args;
            await UniTask.CompletedTask;
        }

        public virtual void OnUpdate()
        {
            
        }

        public virtual async UniTask OnExit()
        {
            await UniTask.CompletedTask;
        }
    }
}